Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwallet
  Commit: 438f55a0a44880158cf37a7a4d6ae309dbe3cf13
      
https://github.com/conformal/btcwallet/commit/438f55a0a44880158cf37a7a4d6ae309dbe3cf13
  Author: Josh Rickmar <[email protected]>
  Date:   2014-02-19 (Wed, 19 Feb 2014)

  Changed paths:
    M sockets.go

  Log Message:
  -----------
  Set deadline on client websocket sends.

It appears that the websocket package will occasionally enter a
Codec's Send function and block forever, never erroring (presumably
due to a closed connection).  This change adds a deadline for the send
of two seconds.  If the send cannot complete before the deadline is
reached, the send is aborted and the connection is assumed to be lost.

A buffer should be added here as well, so even waiting max two seconds
for the send to error out won't cause wallet code to block.


Reply via email to