Server does not need to raise exception on failed sendto(). Fixes #183.
This commit is contained in:
@@ -266,6 +266,8 @@ void Connection::send( string s )
|
||||
ssize_t bytes_sent = sendto( sock, p.data(), p.size(), 0,
|
||||
(sockaddr *)&remote_addr, sizeof( remote_addr ) );
|
||||
|
||||
if ( server ) { return; } /* No need to spin; just treat as dropped packet. */
|
||||
|
||||
if ( bytes_sent == static_cast<ssize_t>( p.size() ) ) {
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user