elephant.io icon indicating copy to clipboard operation
elephant.io copied to clipboard

Handling server deconnection

Open FredoVelcro-zz opened this issue 10 years ago • 1 comments

Hello,

A have a node.js server listening on a socket, my PHP script emit events to this server. If the server crash just before i emit the event, my PHP script crash with :

Notice: fwrite(): send of 7 bytes failed with errno=10054
' in D:\WWWroot\location-voiture.com\V2_sf2.1\vendor\wisembly\elephant.io\src\Engine\SocketIO\Version1X.php:99

Is there a way to handle server deconnection ? (try / catch surround emit event does not work)

Thank you !

FredoVelcro-zz avatar Feb 12 '15 09:02 FredoVelcro-zz

Maybe there is a way to at least put the fwrite operation as silent (with a @), and then check the last error or the number of written bytes...

Taluu avatar Feb 12 '15 14:02 Taluu