NetTalk Central

Author Topic: SendError locks server  (Read 2253 times)

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
SendError locks server
« on: September 15, 2011, 04:53:05 PM »
NT 5.34 - I'm using self.senderror method to send a server busy message. The message gets sent but then the server never recovers. If I then close the server window, the server exe is still running without a window. :(
Here is what I have after the  loc:RequestData :=: p_RequestData line

          If (MaxThreads > 0 AND Threadcnt >= MaxThreads) OR g:NoLogin
              self.senderror(500,'Server Busy','Server Busy, try again shortly')
              Return
          End

I included the g:nologin as a test trigger.

I haven't dug into the code too deeply yet, but looking at netweb.clw, the SendError procedure starts with a self._wait() but doesn't end with a self._release() =- unless maybe there is one somewhere else that matches up later.

Chris

Real programmers use copy con newapp.exe

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: SendError locks server
« Reply #1 on: September 15, 2011, 05:46:04 PM »
I would throw a debug point just before your code to see if this is where your loop is.

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: SendError locks server
« Reply #2 on: September 15, 2011, 06:14:19 PM »
Thanks, Kevin.
I did that and removed it thinking it may have contributed to the error.
no loop that I can see.

I did lock it up just before going to dinner. When I came back the log on the screen had the session deleted 20 times - same session number. Maybe that's a clue, but I don't get it.

chris
Real programmers use copy con newapp.exe

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: SendError locks server
« Reply #3 on: September 15, 2011, 09:03:19 PM »
Hi Chris,

>> but looking at netweb.clw, the SendError procedure starts with a self._wait() but doesn't end with a self._release()

that's the bug - well spotted.
Please just add
 self._release()
to the end of the method.

Cheers
Bruce