nobody knows...?
|
|
Ok i set up my server on centos and when i run it, it works fine untill someone logs out. it wont save the file....
i get this..
might have spelled a few words wrong cuz i cant copy over from the linux vpsCode:java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(native method) at java.net.SocketOutputStream.socketWrite(socketOutputStream).java:109 at java.net.SocketoutputStream.write(socketOutputStream.java:153) at client.parseOutgoingPackets(client.java:9382) at client.packetProcess(client.java:17149) at client.packetSending(client.java:17141) at playerhander.process(playerhandler.java:138) at server.main(server.java:51)
nobody knows...?
Well from what I can come up with when I google "java.net.SocketException: Broken pipe"
Most people said something similar to what this guy said "This happens when you write to a TCP connection that has already been closed by the reading end. Depending on your application, you would either treat it as an application protocol error or ignore it and give up. In either case the socket is almost certainly dead and must be closed, and the client session abandoned."

Client.java line 9382 post it
line 9382
whole methodout.write(buffer, offset, numBytesInBuffer);
Code:public void parseOutgoingPackets() { // relays any data currently in the buffer if(writePtr != readPtr) { offset = readPtr; if(writePtr >= readPtr) numBytesInBuffer = writePtr - readPtr; else numBytesInBuffer = bufferSize - readPtr; if(numBytesInBuffer > 0) { try { // Thread.sleep(3000); // artificial lag for testing purposes out.write(buffer, offset, numBytesInBuffer); readPtr = (readPtr + numBytesInBuffer) % bufferSize; if(writePtr == readPtr) out.flush(); } catch(java.lang.Exception __ex) { misc.println("BlakeScape Server: Exception!"); __ex.printStackTrace(); disconnected = true; }
You are trying to write to the socket after you have closed it.... So put a check in somewhere to make sure that when a player logs out you stop the writing to the socket... if that made any sense
plz i really need this, btw the server works on windows perfectly just on linux it doesnt...
| « [PI] how do you delete objects(the 1s that were already made) | Need Urgent help! Meduasas/Hyperion » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |