1
0
forked from extern/smegmesh
- Ready for presentation
This commit is contained in:
Tim Beatham 2024-01-17 14:52:09 +00:00
parent 41d41694a6
commit 915263e49a

View File

@ -143,14 +143,13 @@ func (m *ConnectionManagerImpl) RemoveConnection(endPoint string) error {
m.conLoc.Lock()
connection, ok := m.clientConnections[endPoint]
if !ok {
// nothing to do if no connection
return nil
var err error
if ok {
err = connection.Close()
delete(m.clientConnections, endPoint)
}
err := connection.Close()
delete(m.clientConnections, endPoint)
m.conLoc.Unlock()
return err
}