Godeps/_workspace/src/gopkg.in/mgo.v2/server.go
func (server *mongoServer) AbendSocket(socket *mongoSocket) {
	server.Lock()
	server.abended = true
	if server.closed {
		server.Unlock()
		return
	}
	server.liveSockets = removeSocket(server.liveSockets, socket)
	server.unusedSockets = removeSocket(server.unusedSockets, socket)
	server.Unlock()
	// Maybe just a timeout, but suggest a cluster sync up just in case.
	select {
	case server.sync <- true:
	default:
	}
}
func (server *mongoServer) AbendSocket(socket *mongoSocket) {
	server.Lock()
	server.abended = true
	if server.closed {
		server.Unlock()
		return
	}
	server.liveSockets = removeSocket(server.liveSockets, socket)
	server.unusedSockets = removeSocket(server.unusedSockets, socket)
	server.Unlock()
	// Maybe just a timeout, but suggest a cluster sync up just in case.
	select {
	case server.sync <- true:
	default:
	}
}
func ( server * mongoServer ) AbendSocket ( socket * mongoSocket ) { server . Lock ( ) server . abended = true if server . closed { server . Unlock ( ) return } server . liveSockets = removeSocket ( server . liveSockets , socket ) server . unusedSockets = removeSocket ( server . unusedSockets , socket ) server . Unlock ( ) // Maybe just a timeout, but suggest a cluster sync up just in case. select { case server . sync <- true : default : } }
// AbendSocket notifies the server that the given socket has terminated
// abnormally, and thus should be discarded rather than cached.
AbendSocket notifies the server that the given socket has terminated abnormally and thus should be discarded rather than cached .