Improve handling of disconnects and reconnects (#228)
* Check response 0 on disconnect From recv(): The return value will be 0 when the peer has performed an orderly shutdown * Add persistent presence and handlers * Use buffer instead of raw struct * Clear presence data on shutdown * Remove CurrentPresence and add boolean instead This removes the need for having 2 big buffers in favor of using a small boolean
This commit is contained in:
committed by
Mason Sciotti
parent
98855b4d84
commit
dd47c7c66d
@ -118,5 +118,8 @@ bool BaseConnection::Read(void* data, size_t length)
|
||||
}
|
||||
Close();
|
||||
}
|
||||
else if (res == 0) {
|
||||
Close();
|
||||
}
|
||||
return res == (int)length;
|
||||
}
|
||||
|
Reference in New Issue
Block a user