forked from cwtch.im/cwtch
Explicitly Send Peer Disconnected Event when Blocking
This commit is contained in:
parent
f64d7ab1ed
commit
e7f6dc3fa1
|
@ -125,6 +125,10 @@ func (e *engine) eventHandler() {
|
||||||
if connection != nil && err == nil {
|
if connection != nil && err == nil {
|
||||||
connection.Close()
|
connection.Close()
|
||||||
}
|
}
|
||||||
|
// Explicitly send a disconnected event (if we don't do this here then the UI can wait for a while before
|
||||||
|
// an ongoing Open() connection fails and so the user will see a blocked peer as still connecting (because
|
||||||
|
// there isn't an active connection and we are stuck waiting for tor to time out)
|
||||||
|
e.peerDisconnected(ev.Data[event.RemotePeer])
|
||||||
case event.ProtocolEngineStartListen:
|
case event.ProtocolEngineStartListen:
|
||||||
go e.listenFn()
|
go e.listenFn()
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue