public Task Disconnect()
{
var context = new HaiTaxiContainer();
var driver = context.OperatorEmployeeSet.Where(o => o.ConnectionId == Context.ConnectionId).FirstOrDefault();
driver.IsWorking = false;
driver.OperatorWorkingHistory.Add(new OperatorWorkingHistory
{
IsWorking = false,
Time = DateTime.Now
});
return Clients.leave(Context.ConnectionId, DateTime.Now.ToString()); ;
}
if (chat.disconnect!=null){
chat.disconnect(function () {
alert('Server has disconnected');
});
alert('Server disconnect==smt');
}else{
alert('Server disconnect==null');
}
クライアントの chat.disconect が null です。理由はありますか?