Fix panic if serviceExport is nil

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
This commit is contained in:
Tomasz Pietrek
2023-02-28 15:36:37 +01:00
parent bca45c28aa
commit 10c2c387b7

View File

@@ -2360,7 +2360,9 @@ func (a *Account) addRespServiceImport(dest *Account, to string, osi *serviceImp
// Always grab time and make sure response threshold timer is running.
si.ts = time.Now().UnixNano()
osi.se.setResponseThresholdTimer()
if osi.se != nil {
osi.se.setResponseThresholdTimer()
}
if rt == Singleton && tracking {
si.latency = osi.latency