fix not ending error correctly
This commit is contained in:
@ -66,6 +66,7 @@ export class SmartsocketClient {
|
||||
})
|
||||
return done.promise
|
||||
}
|
||||
|
||||
disconnect () {
|
||||
let done = plugins.smartq.defer()
|
||||
this.socketConnection.socket.disconnect()
|
||||
@ -74,6 +75,7 @@ export class SmartsocketClient {
|
||||
done.resolve()
|
||||
return done.promise
|
||||
}
|
||||
|
||||
serverCall (functionNameArg: string, dataArg: any) {
|
||||
let done = plugins.smartq.defer()
|
||||
let socketRequest = new SocketRequest({
|
||||
|
@ -49,7 +49,7 @@ export class SocketConnection {
|
||||
authenticated: boolean = false
|
||||
role: SocketRole
|
||||
smartsocketHost: Smartsocket
|
||||
socket: any //: SocketIO.Socket | SocketIOClient.Socket
|
||||
socket: any // SocketIO.Socket | SocketIOClient.Socket
|
||||
constructor (optionsArg: ISocketConnectionConstructorOptions) {
|
||||
this.alias = optionsArg.alias
|
||||
this.authenticated = optionsArg.authenticated
|
||||
@ -62,6 +62,7 @@ export class SocketConnection {
|
||||
allSocketConnections.add(this)
|
||||
this.socket.on('disconnect', () => {
|
||||
plugins.beautylog.info(`SocketConnection with >alias ${this.alias} on >side ${this.side} disconnected`)
|
||||
this.socket.disconnect()
|
||||
allSocketConnections.remove(this)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user