diff options
Diffstat (limited to 'unix/xserver/hw/vnc/RFBGlue.cc')
-rw-r--r-- | unix/xserver/hw/vnc/RFBGlue.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc index 53d5bdb0..19338fc7 100644 --- a/unix/xserver/hw/vnc/RFBGlue.cc +++ b/unix/xserver/hw/vnc/RFBGlue.cc @@ -187,7 +187,10 @@ int vncGetSocketPort(int fd) int vncIsTCPPortUsed(int port) { try { - network::TcpListener l(NULL, port); + // Attempt to create TCPListeners on that port. + // They go out of scope immediately and are destroyed. + std::list<network::TcpListener> dummy; + network::createTcpListeners (&dummy, 0, port); } catch (rdr::Exception& e) { return 0; } |