Closed alexlapa closed 4 years ago
FCM:
Fix WsSession closing without notifying Room and Commands (#76)
- use Addr::send() instead of Addr::try_send() in WsSession when sending messages to Room
- ensure RpcConnectionClosed is sent when WsSession is stopped
Additionally:
- improve WsSession tests
- improve Medea's HTTP server tests
Synopsis
According to medea-demo logs after some usage:
SendError::Full
(send failed because receiver is full).ws::Message
stream being finished without emittingws::Message::Close
frame orws::ProtocolError
.Solution
try_send
withsend
.RpcConnectionClosed
message inWsSession
actorstopped()
callback.Additionally:
WsSession
with tests.RpcServer
trait and impl it for'Addr<Room>
, to makeWsSession
testable.Server::register_data
andServer::configure
to reuse configuration in tests.Checklist
WIP:
prefixk::
labels appliedWIP:
prefix is removed