Skip to content

Commit 3fc7559

Browse files
committed
OutputDataReceivedHandler and ErrorDataReceivedHandler now check for empty data.
1 parent f26f3d0 commit 3fc7559

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/NodeJS/NodeJSServiceImplementations/OutOfProcess/OutOfProcessNodeJSService.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ internal virtual void CreateAndConnectToNodeJSProcess(EventWaitHandle waitHandle
280280

281281
internal void OutputDataReceivedHandler(object _, DataReceivedEventArgs evt, EventWaitHandle waitHandle)
282282
{
283-
if (evt.Data == null)
283+
string data = evt.Data;
284+
if (string.IsNullOrEmpty(data))
284285
{
285286
return;
286287
}
@@ -306,7 +307,8 @@ internal void OutputDataReceivedHandler(object _, DataReceivedEventArgs evt, Eve
306307

307308
internal void ErrorDataReceivedHandler(object sender, DataReceivedEventArgs evt)
308309
{
309-
if (evt.Data == null)
310+
string data = evt.Data;
311+
if (string.IsNullOrEmpty(data))
310312
{
311313
return;
312314
}

0 commit comments

Comments
 (0)