SignalR disconnect function not recognized on client
===

    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');
            }

The client chat.disconect is null. ANy ideeas why?