This commit is contained in:
Joao Moreno
2016-06-14 15:32:28 +02:00
parent 7b7297e091
commit e129cd0bb8

View File

@@ -29,8 +29,12 @@ class Protocol implements IMessagePassingProtocol {
}
public send(message: any): void {
this.socket.write(JSON.stringify(message));
this.socket.write(Protocol.Boundary);
try {
this.socket.write(JSON.stringify(message));
this.socket.write(Protocol.Boundary);
} catch (e) {
// noop
}
}
public onMessage(callback: (message: any) => void): void {