Skip to content

Commit a1551a9

Browse files
committed
Work around Sync Gateway not responding to close requests
1 parent 7400b23 commit a1551a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

websocket-sharp/Ext.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,10 @@ internal static void ReadBytesAsync (
691691

692692
stream.BeginRead (buff, offset, length, callback, null);
693693
}
694+
catch(ObjectDisposedException) {
695+
var hack = new WebSocketFrame(Opcode.Close, PayloadData.Empty, false);
696+
completed(hack.ToArray());
697+
}
694698
catch (Exception ex) {
695699
if (error != null)
696700
error (ex);

0 commit comments

Comments
 (0)