Qestion about Ptokax UDP-Debug messages
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Qestion about Ptokax UDP-Debug messages

Started by Alexandros, 24 November, 2006, 03:14:29

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alexandros

hi, i want to know or where i can read about (or both) of this messages and what causes it.
i want to know if i have any problem on my server, i have less users than a month or two ago (like 100 less of 200)
recv() error WSAECONNRESET. User is being closed.
Login timeout 20 seconds for ******** - user disconnected.
thanks

PPK

WSAECONNRESET is conenction reset, it is socket error and here is no way to do anything against it. When windows want then they report this error on socket and connection is no more useable.
20 seconds is timeout of login, it is how long Ptokax waiting if user reply to $Lock. Most of this timeout is caused again by windows, because most of connections is from windows users and for unknown reason they sometimes get connected but don't reply to lock (it looks like it is not possible to send or receive anything on this connection).
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Alexandros

Thanks PPK, now its worst :P i hate when i know what causes the problem but cant solve it.


Tw?sT?d-d?v

in the last few days i noticed the same errors in PXUPDDEBUG (which didnt happen b4)   and after reading here i did some searching,
unsure if this would help in the error fixing ...

If you have a non-blocking recvfrom() loop like this to read from your socket, you are doing the wrong thing:


do
{
  ret = recvfrom(...);
  if ( ret != SOCKET_ERROR )
    dispatch_data ();
}while ( ret != SOCKET_ERROR )

Because WSAECONNRESET obviously causes a SOCKET_ERROR but actually there is no error and you should keep reading the socket when WSAECONNRESET occurs. So it should read something like this;


do
{
  ret = recvfrom(...);
  if ( ret == SOCKET_ERROR )
    err = WSAGetLastError ( );
  else
    dispatch_data ();
}while ( ret != SOCKET_ERROR || ( ret == SOCKET_ERROR && err == WSAECONNRESET ) )

PPK

I tryed to use sockets after they get WSAECONNRESET, but they continue in returning this error and is not possible to send or receive any data. And many this errors is returned because user disconnect ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

CrazyGuy

Quotein the last few days i noticed the same errors in PXUPDDEBUG (which didnt happen b4)

Had a similair problem a few days ago. Resetting my modem solved that.

Quote from: PPK on 10 January, 2007, 21:16:47
I tryed to use sockets after they get WSAECONNRESET, but they continue in returning this error and is not possible to send or receive any data. And many this errors is returned because user disconnect ::)

Re-using sockets is also something that's troubling me when programming. I think it has to do with "disposed" sockets not being freed. Not quite sure how to work around that yet, but if I'm correct, Windows frees up used sockets on timer. There might however also be a function in the WSA to do this on command. Maybe interresting to look into ?

PPK

I don't have problem to reuse socket for another connection, when socket get error (except WSAEWOULDBLOCK, this one is normal for non-blocking sockets when is nothing to read) or otherside close connection then is socket closed by closesocket(socket); ...
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Tw?sT?d-d?v

Quote from: CrazyGuy on 11 January, 2007, 11:44:46
Had a similair problem a few days ago. Resetting my modem solved that.


Never thought of that . done and all seems better   :)

SMF spam blocked by CleanTalk