diff options
Diffstat (limited to 'CSharp')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs index 70c31b0..259d589 100644 --- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs +++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs @@ -55,13 +55,20 @@ namespace IvyBus private void sendMsg(MessageType msgType, ushort msgId, string msgData)
{
- output.Write((ushort)msgType);
- output.Write( ' ' );
- output.Write( msgId );
- output.Write( ARG_START );
- output.Write( msgData );
- output.Write( MSG_END);
- output.Flush();
+ try
+ {
+ output.Write((ushort)msgType);
+ output.Write(' ');
+ output.Write(msgId);
+ output.Write(ARG_START);
+ output.Write(msgData);
+ output.Write(MSG_END);
+ output.Flush();
+ }
+ catch (IOException ex)
+ {
+ // Broken pipe
+ }
}
void IvyProtocol.TokenStartRegexp(ushort port, string appName)
{
|