Skip Menu |

This queue is for tickets about the IO CPAN distribution.

Report information
The Basics
Id: 65045
Status: resolved
Priority: 0/
Queue: IO

Owner: Nobody in particular
Requestors: killing [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: IO::Socket send croaks on send fail due to getpeername + performance issue
Date: Sun, 23 Jan 2011 20:27:47 -0000
To: <bug-IO [...]>
From: "Steven Hartland" <killing [...]>
Due to the way IO::Socket uses getpeername a simple failed send can cause the call to croak instead of returning an error. The reason for this is that getpeername can fail if a previous connected tcp socket is reset by the peer. In this case the send should return with a failure code and $! should indicated the failure of ECONNRESET. In addition the current code calls getpeername for every single send call which is not required for connected sockets e.g. tcp. For large numbers of sends this extra kernel call could be quite a performance drain so it would be good to remove it and kill two birds with one stone. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to
Ticket migrated to github as

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to