]> git.proxmox.com Git - qemu-server.git/commitdiff
use ReuseAddr for vncproxy
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 16 May 2017 14:21:01 +0000 (16:21 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 17 May 2017 11:38:54 +0000 (13:38 +0200)
to avoid "Socket already in use" errors, when quickly opening/closing
console sessions on the webinterface

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Qemu.pm

index 43a5e4a503ba9a784259b492a1cd7dea1847b16e..c566c4d8d2a153c3371d1031ea89e3f6480dfad4 100644 (file)
@@ -1433,6 +1433,7 @@ __PACKAGE__->register_method({
                $cmd = [@$remcmd, "/usr/sbin/qm", 'vncproxy', $vmid];
 
                my $sock = IO::Socket::IP->new(
+                   ReuseAddr => 1,
                    Listen => 1,
                    LocalPort => $port,
                    Proto => 'tcp',