
Just to clarify this:
The interrupts occur with the original nadeo library and also with the new one from Big_Boo ?
Maybe echoing out the data variable before returning false would help to get some information ?
Jojo
Moderator: NADEO
This is something new. But it also means there's something really wrong, which lower the chances that it comes from my library... so, unfortunately, it likely comes from somewhere else.kremsy wrote:Code: Select all
[ManiaControl DEBUG]: Fatal Exception: Connection interrupted while writing
Code: Select all
diff --git a/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php b/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php
index e6deb62..3cc0c44 100644
--- a/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php
+++ b/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php
@@ -218,7 +218,7 @@
{
$header = $this->read(8);
if($header === false)
- throw new TransportException('Connection interrupted while reading header', TransportException::INTERRUPTED);
+ throw new TransportException('Connection interrupted while reading header '.print_r(stream_get_meta_data($this->socket), true), TransportException::INTERRUPTED);
extract(unpack('Vsize/Vhandle', $header));
/** @var $size int */
@@ -231,7 +231,7 @@
$data = $this->read($size);
if($data === false)
- throw new TransportException('Connection interrupted while reading data', TransportException::INTERRUPTED);
+ throw new TransportException('Connection interrupted while reading data '.print_r(stream_get_meta_data($this->socket), true), TransportException::INTERRUPTED);
$this->lastNetworkActivity = time();
return array($handle, $data);
@@ -245,7 +245,7 @@
{
$data = pack('V2a*', strlen($xml), ++$this->requestHandle, $xml);
if(!$this->write($data))
- throw new TransportException('Connection interrupted while writing', TransportException::INTERRUPTED);
+ throw new TransportException('Connection interrupted while writing '.print_r(stream_get_meta_data($this->socket), true), TransportException::INTERRUPTED);
$this->lastNetworkActivity = time();
}
I actually had in mind that only chatSendServerMessage is necessary because making the server "speaking" like any player is weird (and ugly anyway). But using chatSend is shorter than chatSendServerMessage thus I decided to merge it.kremsy wrote:What I don't really understand in the changes is, why you combined chatSend and chatSendServerMessage.
this.kremsy wrote:I just think it can get sometimes weird [...] if the Method names are differing from the official DedicatedServer Method names
Users browsing this forum: No registered users and 1 guest