Bug 537 : proccessing.net.Client.write(int) terminates sketch when client disconnects.
Last modified: 2007-10-20 12:26




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P3
Severity:
normal

 

Reporter:
mellis
Assigned To:
fry

Attachment Type Created Size Actions
sketch demonstrating the problem application/zip 2007-03-22 08:41 488 bytes

Description:   Opened: 2007-03-22 08:39
Client.write(int) calls errorMessage() when the socket connection has been
closed, terminating the sketch. If the client was created with the
Client(PApplet parent, Socket socket) constructor, errorMessage() will
throw a NullPointerException instead of calling parent.die() because the
constructor doesn't assign its parent parameter to this.parent.

Would it be better to copy the behavior of Server.write(bytes[]) and just
print the stack trace of the exception, so that the sketch can continue
when a client disconnects?
Additional Comment #1 From mellis 2007-03-22 08:41
edit]
sketch demonstrating the problem

If you run this sketch, telnet to localhost port 5331, and then quit telnet,
the sketch throws a NullPointerException.
Additional Comment #2 From fry 2007-03-28 15:41
got it, thanks. just need to sit down with the net lib and kick it a few times.
Additional Comment #3 From fry 2007-10-20 12:24
finally fixed for 0131.
Additional Comment #4 From fry 2007-10-20 12:26
*** Bug 538 has been marked as a duplicate of this bug. ***