提交 e129cd0b 编写于 作者: J Joao Moreno

fix npe

上级 7b7297e0
...@@ -29,8 +29,12 @@ class Protocol implements IMessagePassingProtocol { ...@@ -29,8 +29,12 @@ class Protocol implements IMessagePassingProtocol {
} }
public send(message: any): void { public send(message: any): void {
try {
this.socket.write(JSON.stringify(message)); this.socket.write(JSON.stringify(message));
this.socket.write(Protocol.Boundary); this.socket.write(Protocol.Boundary);
} catch (e) {
// noop
}
} }
public onMessage(callback: (message: any) => void): void { public onMessage(callback: (message: any) => void): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册