Project

General

Profile

Bug #2131

How to kill a session

Added by Thomas Knudsen over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/22/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I'm running Wt on Ubuntu with Qt Creator. I set the Wt application IP to 0.0.0.0:8080 in the In the Qt Creator running configuration. First time I run the app, it spawns in this IP but next time I run it, the server chooses another port like 38763, giving the message that port 8080 is taken. The problem is that the Wt session is not killed, when the browser closes or when it's stopped from Qt creator (or both). I've tried to follow the instructions from this link;

http://sptci.com/docs/cpp/wtProject.html

My question is, how can I kill the Wt application leaving the port open for the next run? I short example would be nice

Thanks

#1

Updated by Wim Dumon over 8 years ago

Hello Thomas,

Qt creator should normally be able to kill a Wt application, we have no problems with that here. Can you verify that the process is still running (ps auxwww | grep myprogram)? Did you press the stop button to stop Wt?

What version of Wt are you using? If a port is busy, Wt should exit with an error instead of requesting a random port (this was a bug in some previous release).

BR,

Wim.

#2

Updated by Thomas Knudsen over 8 years ago

Hi Wim,

I'm running Wt version 3.2.1, is that a recent enough version?

I found that I need to do things in the right order, for the session to terminate correctly. I need to kill XTerm first and then press stop button on QtCreator. If QtCreator stop button is pushed first, XTerm will shut down without stopping the session, and the session sticks around occupying the port.

Note that WT doesn't exit with an error when the port is taken. It just re-routes the session to another port.

Anyway, it's no hassle to stop the session in the right order, now that I know the issue.

Also available in: Atom PDF