mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Default to upserting tunnels
This commit is contained in:
@@ -69,11 +69,6 @@ func (m *TunnelManager) RequestCreateTunnel(tunReq Tunnel) (Tunnel, error) {
|
||||
m.mutex.Lock()
|
||||
defer m.mutex.Unlock()
|
||||
|
||||
_, exists := m.db.GetTunnel(tunReq.Domain)
|
||||
if exists {
|
||||
return Tunnel{}, errors.New("Tunnel exists for domain " + tunReq.Domain)
|
||||
}
|
||||
|
||||
port, err := randomOpenPort()
|
||||
if err != nil {
|
||||
return Tunnel{}, err
|
||||
|
||||
Reference in New Issue
Block a user