mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-28 11:51:49 +01:00
Address code review feedback
- Avoid unnecessary SocketAddress object construction by calling family() directly - Use specific exception type (Poco::Exception) instead of catch-all Co-authored-by: aleks-f <2429093+aleks-f@users.noreply.github.com>
This commit is contained in:
@@ -47,11 +47,10 @@ WebSocketImpl::WebSocketImpl(StreamSocketImpl* pStreamSocketImpl, HTTPSession& s
|
||||
// for small WebSocket frames. Skip for Unix domain sockets.
|
||||
try
|
||||
{
|
||||
SocketAddress addr = _pStreamSocketImpl->address();
|
||||
if (addr.family() != SocketAddress::UNIX_LOCAL)
|
||||
if (_pStreamSocketImpl->address().family() != SocketAddress::UNIX_LOCAL)
|
||||
_pStreamSocketImpl->setNoDelay(true);
|
||||
}
|
||||
catch (...)
|
||||
catch (Poco::Exception&)
|
||||
{
|
||||
// Ignore errors (e.g., if socket is not connected yet or doesn't support TCP options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user