Tags: storj/drpc
Tags
drpcstream: SendCancel is busy when writing at all SendCancel would return that it was not busy if the stream was terminated, but there are ways for the stream to be terminated while it is still writing. Instead, check if any writes are happening before the check for termination. Change-Id: Ib3424d351f66741961cb7fe32795c0c0dfa99db2
drpcstream: return ClosedError for remote closes In logging it's helpful to distinguish between an actual stream error and a remote closing, which is to be expected. Updates storj/storj#4609 Change-Id: I5e70413484820efb9d0d2c8792c9713de9f8658f
drpcstream: set cancel state more often if a Close has started, and we Cancel, we should still set the cancelled state while Close is still executing. this is so that we don't surface the underying transport being closed errors. Change-Id: I2f3924f7b03c3952ab58b9952e4ae18ef1a5a88f
drpcserver: log callback and temporary error sleeps It was possible before to spin a cpu core trying to accept from the tcp listener when it always returned a temporary error. Now, it will sleep for 500ms before trying again. Change-Id: I59d1503b4d14e9ded78d78c608ea4c416a4e10df
drpcmanager: fix closing race condition in some situations, newStream could be blocked forever trying to send a stream into m.streams when the manageStreams goroutine has already exited due to manager terminating. this changes the send into a select that can be canceled by the manager terminating. also, there was a race in the tests for the muxer where rare failures could happen if the Route call was not scheduled before the connection with the given prefix was handled. Change-Id: If2033d8b8e3b2c3e3a50e8a72337bc263458321e
PreviousNext