Merge branch 'master' of dan/libricochet-go into master

This commit is contained in:
Sarah Jamie Lewis 2018-06-25 16:19:58 +00:00 committed by Gogs
commit 69c1dc18fb
1 changed files with 1 additions and 7 deletions

View File

@ -59,13 +59,7 @@ func (ra *RicochetApplication) handleConnection(conn net.Conn) {
ra.lock.Lock()
for i, x := range ra.instances {
if x == rai {
if i == 0 {
ra.instances = ra.instances[1:]
} else if i == len(ra.instances)-1 {
ra.instances = ra.instances[:i-1]
} else {
ra.instances = append(ra.instances[:i-1], ra.instances[i+1:]...)
}
ra.instances = append(ra.instances[:i], ra.instances[i+1:]...)
break
}
}