TcpSession: fixed Type error bug