Changeset 258 in code


Ignore:
Timestamp:
Apr 16, 2020, 2:54:13 PM (5 years ago)
Author:
contact
Message:

Disallow marshalling for anotehr network

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r257 r258  
    129129func (dc *downstreamConn) marshalEntity(uc *upstreamConn, name string) string {
    130130        if dc.network != nil {
     131                if dc.network != uc.network {
     132                        panic("soju: tried to marshal an entity for another network")
     133                }
    131134                return name
    132135        }
     
    150153        }
    151154        if dc.network != nil {
     155                if dc.network != uc.network {
     156                        panic("soju: tried to marshal a user prefix for another network")
     157                }
    152158                return prefix
    153159        }
Note: See TracChangeset for help on using the changeset viewer.